-- GENERATED SPELL FOR [Watcher Narjil] --


function spell0_28729(pUnit, Event) --@Blinding Webs,Self--
pUnit:FullCastSpellOnTarget(52524,pUnit)
pUnit:RegisterEvent('Sorts_28729', 6000, 1)
end

function spell1_28729(pUnit, Event) --@Blinding Webs,Self--
pUnit:FullCastSpellOnTarget(59365,pUnit)
pUnit:RegisterEvent('Sorts_28729', 7000, 1)
end

function spell2_28729(pUnit, Event) --@Infected Bite,n/a--
pUnit:FullCastSpellOnTarget(52469,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28729', 9000, 1)
end

function spell3_28729(pUnit, Event) --@Infected Bite,n/a--
pUnit:FullCastSpellOnTarget(59364,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28729', 9000, 1)
end

function spell4_28729(pUnit, Event) --@Web Wrap,n/a--
pUnit:FullCastSpellOnTarget(52086,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28729', 3331, 1)
end

function Sorts_28729(pUnit, Event)
local choix_sorts_28729 = math.random(0, 4)
if choix_sorts_28729 == 0 then
pUnit:RegisterEvent('spell0_28729', 1, 1)
end
if choix_sorts_28729 == 1 then
pUnit:RegisterEvent('spell1_28729', 1, 1)
end
if choix_sorts_28729 == 2 then
pUnit:RegisterEvent('spell2_28729', 1, 1)
end
if choix_sorts_28729 == 3 then
pUnit:RegisterEvent('spell3_28729', 1, 1)
end
if choix_sorts_28729 == 4 then
pUnit:RegisterEvent('spell4_28729', 1, 1)
end
end

function mob28729_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28729', math.random(1500, 3000), 1)
end

function mob28729_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28729_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28729_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28729, 1, 'mob28729_Action')
RegisterUnitEvent(28729, 2, 'mob28729_Leave')
RegisterUnitEvent(28729, 3, 'mob28729_Kill')
RegisterUnitEvent(28729, 4, 'mob28729_Die')
